home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 June: Reference Library / Dev.CD Jun 94.toast / Periodicals / develop / develop Issues 1-3 / develop Issue 2 code / Speed Development / UGraph.h < prev   
Encoding:
Text File  |  1990-03-07  |  1.3 KB  |  48 lines  |  [TEXT/MWII]

  1. // UGraph.h
  2. // Copyright © 1990 Apple Computer, Inc.  All rights reserved.
  3.  
  4. #ifndef  __UGRAPH__
  5. #define __UGRAPH__
  6.  
  7. // • Auto-Include the requirements for this unit's interface.
  8. #ifndef  __UMacApp__
  9. #include "UMacApp.h"
  10. #endif
  11.  
  12. #include "Graph.h"
  13.  
  14. /* the interface to this class goes here */
  15.  
  16. class TGraph : public TView {
  17.   public:
  18.     virtual pascal void IRes(TDocument *itsDocument, TView *itsSuperView, Ptr *itsParams);
  19.     // Initialize the graph view from its resource template.
  20.  
  21.     virtual pascal void SetGraphRect(Rect graphRect);
  22.     // Initializes the graph data structure to be the size of this view
  23.  
  24.     virtual pascal void SetPoint( short which, long value );
  25.     // set a point to a value
  26.  
  27.     virtual pascal short GetNumPoints();
  28.     // return the number of points in the graph
  29.  
  30.     virtual pascal void ComputeBars(Boolean redraw);
  31.     // the graph library computes each of the bars for this graph
  32.     // and if redraw is TRUE forces the view to redraw itself
  33.  
  34.     virtual pascal void GetCoordinateRange(Rect *coordRange);
  35.     // return min & max Y coordinates, and min & max X coordinates,
  36.     // useful for labeling the axes of the graph
  37.  
  38.     virtual pascal void Draw(Rect *area);
  39.     // draws the graph
  40.     
  41.     virtual pascal void Free(void);
  42.     // frees the data allocated by this class
  43.  
  44.   private:
  45.       GraphStructPtr    fData;
  46. };
  47.  
  48. #endif